<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>isNode</title>
</head>

<body>
    <script>
        const isNode = () =>
            typeof process !== 'undefined' &&
            !!process.versions &&
            !!process.versions.node;
        document.write(`当前${isNode() ? '' : '不'}是Node环境`)
    </script>
</body>

</html>